package com.ruoyi.wm.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wm.mapper.WmMedicinesMapper;
import com.ruoyi.wm.domain.WmMedicines;
import com.ruoyi.wm.service.IWmMedicinesService;
import com.ruoyi.common.core.text.Convert;

/**
 * 药品列表Service业务层处理
 * 
 * @author hpf
 * @date 2021-12-02
 */
@Service
public class WmMedicinesServiceImpl implements IWmMedicinesService 
{
    @Autowired
    private WmMedicinesMapper wmMedicinesMapper;

    /**
     * 查询药品列表
     * 
     * @param id 药品列表ID
     * @return 药品列表
     */
    @Override
    public WmMedicines selectWmMedicinesById(Long id)
    {
        return wmMedicinesMapper.selectWmMedicinesById(id);
    }

    /**
     * 查询药品列表列表
     * 
     * @param wmMedicines 药品列表
     * @return 药品列表
     */
    @Override
    public List<WmMedicines> selectWmMedicinesList(WmMedicines wmMedicines)
    {
        return wmMedicinesMapper.selectWmMedicinesList(wmMedicines);
    }

    /**
     * 新增药品列表
     * 
     * @param wmMedicines 药品列表
     * @return 结果
     */
    @Override
    public int insertWmMedicines(WmMedicines wmMedicines)
    {
        return wmMedicinesMapper.insertWmMedicines(wmMedicines);
    }

    /**
     * 修改药品列表
     * 
     * @param wmMedicines 药品列表
     * @return 结果
     */
    @Override
    public int updateWmMedicines(WmMedicines wmMedicines)
    {
        return wmMedicinesMapper.updateWmMedicines(wmMedicines);
    }

    /**
     * 删除药品列表对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWmMedicinesByIds(String ids)
    {
        return wmMedicinesMapper.deleteWmMedicinesByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除药品列表信息
     * 
     * @param id 药品列表ID
     * @return 结果
     */
    @Override
    public int deleteWmMedicinesById(Long id)
    {
        return wmMedicinesMapper.deleteWmMedicinesById(id);
    }
}
